package com.example.parking.mq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class SensorEventListener {
    private static final Logger log = LoggerFactory.getLogger(SensorEventListener.class);

    @RabbitListener(queues = RabbitConfig.QUEUE)
    public void onMessage(String payload) {
        log.info("[SensorEvent] received: {}", payload);
        // TODO: 在此根据地磁/闸机事件触发占位/释放逻辑
    }
}


